package org.lds.scheduled.job.worker.common.enums;


import org.lds.scheduled.job.common.enums.ErrCodeEnum;

public enum WorkerErrorEnum implements ErrCodeEnum {
    REGISTER_WORKER_FAIL("REGISTER_WORKER_FAIL", "注册worker失败"),

    SCHEDULER_START_FAIL("SCHEDULER_START_FAIL", "调度器启动失败"),

    CONTENT_INVALID("CONTENT_INVALID", "content格式不合法"),
    CRON_INVALID("CRON_INVALID", "cron格式不合法"),
    JOB_EXECUTE_FAIL("JOB_EXECUTE_FAIL", "job执行失败"),
    JOB_DELETE_FAIL("JOB_DELETE_FAIL", "job删除失败"),
    JOB_PAUSE_FAIL("JOB_PAUSE_FAIL", "job暂停失败"),
    JOB_UPDATE_FAIL("JOB_UPDATE_FAIL", "job更新失败"),
    JOB_RESUME_FAIL("JOB_RESUME_FAIL", "job重启失败"),
    ;

    private String code;
    private String message;

    WorkerErrorEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getErrCode() {
        return code;
    }

    @Override
    public String getErrMsg() {
        return message;
    }

}
